﻿namespace dPet.Infrastructure.EntityFramework.ModelConfigurations
{
	using dPet.Domain.Models;
	using Hangerd.EntityFramework;

	public class ProductConfig : EntityTypeConfigBase<Product>
	{
		public ProductConfig()
		{
			Property(p => p.HospitalId)
				.IsRequired()
				.HasMaxLength(32);

			Property(p => p.Barcode)
				.HasMaxLength(50);

			Property(p => p.Name)
				.IsRequired()
				.HasMaxLength(50);

			Property(p => p.UnitName)
				.HasMaxLength(10);

			Property(p => p.QueryTag)
				.HasMaxLength(20);
		}
	}
}
